package com.gxuwz.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 物料实体
 * </p>
 *
 * @author 刘玉霜
 * @since 2017-10-27
 */
public class Material extends Model<Material> {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
	private Integer id;
    
	private String name;
    
	@TableField("unit_price")
	private Double unitPrice;
	
	private Integer amount;
	
	@TableField("total_price")
	private Double totalPrice;
	
	@TableField("is_purchase")
	private Integer isPurchase;
	
    /**
     * 是否入库：0.未入库（默认） 1.已入库
     */
	@TableField("is_storage")
	private Integer isStorage;
	
	@TableField("create_time")
	private String createTime;
	
	/** 采购单ID */
	@TableField("purchase_id")
	private String purchaseId;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public Integer getIsPurchase() {
		return isPurchase;
	}

	public void setIsPurchase(Integer isPurchase) {
		this.isPurchase = isPurchase;
	}

	public Integer getIsStorage() {
		return isStorage;
	}

	public void setIsStorage(Integer isStorage) {
		this.isStorage = isStorage;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getPurchaseId() {
		return purchaseId;
	}

	public void setPurchaseId(String purchaseId) {
		this.purchaseId = purchaseId;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Material{" +
			", id=" + id +
			", name=" + name +
			", unitPrice=" + unitPrice +
			", amount=" + amount +
			", totalPrice=" + totalPrice +
			", isPurchase=" + isPurchase +
			", isStorage=" + isStorage +
			", createTime=" + createTime +
			", purchaseId=" + purchaseId +
			"}";
	}
}
